<!--
 * @Author: zxh
 * @Email: 1271027008@qq.com
 * @Date: 2020-03-10 10:40:30
 * @Descripttion: 审批入库
 -->
<div class="approval_in_container">
    <div nz-row nzGutter="10" class="row_1">
        <div nz-row class="model_container">
            <div nz-row nzGutter="10" class="row_3">
                <div nz-col>
                    <label nz-col nzSpan="2" class="fill_label">申请编码：</label>
                    <div nz-col nzSpan="3" class="fill_control">
                        <input nz-input [(ngModel)]="viewModel.code" disabled />
                    </div>
                </div>
                <div nz-col>
                    <label nz-col nzSpan="3" class="fill_label">单据类型：</label>
                    <div nz-col nzSpan="5" class="fill_control">
                        <input nz-input [(ngModel)]="viewModel.billTypeStr" disabled />
                    </div>
                </div>
            </div>

            <div nz-row nzGutter="10" class="row_3">
                <div nz-col>
                    <label nz-col nzSpan="2" class="fill_label">审批状态：</label>
                    <div nz-col nzSpan="3" class="fill_control">
                        <input nz-input [(ngModel)]="viewModel.statusTypeStr" disabled />
                    </div>
                </div>
                <div nz-col>
                    <label nz-col nzSpan="3" class="fill_label">最后审批人：</label>
                    <div nz-col nzSpan="5" class="fill_control">
                        <input nz-input [(ngModel)]="viewModel.lastApproverName" disabled />
                    </div>
                </div>
                <div nz-col>
                    <label nz-col nzSpan="3" class="fill_label">最后审批时间：</label>
                    <div nz-col nzSpan="5" class="fill_control">
                        <input nz-input [(ngModel)]="viewModel.lastApprovalDate" disabled />
                    </div>
                </div>
            </div>

            <div nz-row nzGutter="10" class="row_3">
                <div nz-col>
                    <label nz-col nzSpan="2" class="fill_label">申请人：</label>
                    <div nz-col nzSpan="3" class="fill_control">
                        <input nz-input [(ngModel)]="viewModel.createByName" disabled />
                    </div>
                </div>
                <div nz-col>
                    <label nz-col nzSpan="3" class="fill_label">申请时间：</label>
                    <div nz-col nzSpan="5" class="fill_control">
                        <input nz-input [(ngModel)]="viewModel.reqDate" disabled />
                    </div>
                </div>
                <div nz-col>
                    <label nz-col nzSpan="3" class="fill_label">最后修改时间：</label>
                    <div nz-col nzSpan="5" class="fill_control">
                        <input nz-input [(ngModel)]="viewModel.updateDate" disabled />
                    </div>
                </div>
            </div>
            <div nz-row nzGutter="10" class="row_3">
                <div nz-col>
                    <label nz-col nzSpan="2" class="fill_label">备注：</label>
                    <div nz-col nzSpan="10" class="fill_control">
                        <textarea disabled nz-input [nzAutosize]="{ minRows: 5, maxRows: 6 }" maxlength="200"
                            [(ngModel)]="viewModel.remarks"></textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div nz-row class="row_2">
    <nz-table #expandTable [nzData]="viewModel.details" [nzFrontPagination]="false" [nzBordered]="true"  nzSize="small">
        <thead>
            <tr>
                <th>物料编码</th>
                <th>物料名称</th>
                <th>库房</th>
                <th>库区</th>
                <th>账户别名</th>
                <th>工作令</th>
                <th>单位</th>
                <th>生产日期</th>
                <th>供应商批次</th>
                <th>条码批次</th>
                <th>包装规格</th>
                <th>包装量</th>
                <th>实际量</th>
                <th>打印条码</th>
                <th>备注</th>
            </tr>
        </thead>
        <tbody>
            <tr *ngFor="let data of expandTable.data" class="tbodyData ant-table-row ng-star-inserted">
                <td>{{ data.materialCode }}</td>
                <td>{{ data.materialName }}</td>
                <td>{{ data.warehouseName }}</td>
                <td>{{ data.warehouseAreaName }}</td>
                <td>{{ data.accountAliasName }}</td>
                <td>{{ data.commandName }}</td>
                <td>{{ data.unit }}</td>
                <td>{{ data.productionDate }}</td>
                <td>{{ data.supplierBatch }}</td>
                <td>{{ data.codeBatch }}</td>
                <td>{{ data.packageSpec }}</td>
                <td>{{ data.packageNum }}</td>
                <td>{{ data.actualNum }}</td>
                <td>{{ data.printCode }}</td>
                <td>{{ data.remarks }}</td>
            </tr>
        </tbody>
    </nz-table>
</div>

<div nz-row style="margin: 30px;">
    <label nz-col nzSpan="4" style="text-align: right;font-weight: bold;">审批备注：</label>
    <div nz-col nzSpan="20" class="fill_control">
        <textarea style="width: 70%;" nz-input [nzAutosize]="{ minRows: 5, maxRows: 6 }" [(ngModel)]="remarks"></textarea>
    </div> 
</div>

<div nz-row class="footer_row" style="margin-top: 10px;text-align: center;">
    <button nz-button type="button" nzType="primary" (click)="subApproval(1)">同意</button>
    <button nz-button type="button" nzType="danger" (click)="subApproval(2)">退回</button>
    <button nz-button type="button" nzType="default" (click)="Return()">返回</button>
</div>